//
//  Style10TableViewDataSource.m
//  PiPiPineapple
//
//  Created by 李晓东 on 17/11/7.
//  Copyright © 2017年 PeanutXu. All rights reserved.
//

#import "Style10TableViewDataSource.h"
#import "Style10TableViewCell.h"
@interface Style10TableViewDataSource ()
@property (nonatomic, strong) NSMutableArray *array;
@end

@implementation Style10TableViewDataSource

- (instancetype)initWithData:(NSMutableArray *)array{
    if (self = [super init]) {
        self.array = array;
    }
    
    return self;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.array.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    Style10TableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"li"];
    DoubleChromosphere *obj = (DoubleChromosphere *)self.array[indexPath.row];
    [cell showData:obj];
    return cell;
}

@end
